<template>
  <!-- 布局 -->
  <div class="common-layout" style="height: 100%;">
    <el-container style="height: 100%;">
      <el-aside width="200px" style="background-color: #545c64;">
        <el-menu active-text-color="#ffd04b" background-color="#545c64" class="el-menu-vertical-demo" default-active="2"
          text-color="#fff">
          <!-- 登录信息 -->
          <el-menu-item index="1">
            <el-icon><icon-menu /></el-icon>
            <span @click="router.push({ name: 'Login' })">登录信息</span>
          </el-menu-item>
          <!-- 企业管理信息 -->
          <el-sub-menu index="2">
            <template #title>
              <el-icon>
                <location />
              </el-icon>
              <span>企业管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="2-1" @click="router.push({ name: 'Unit' })">企业管理-添加</el-menu-item>
            </el-menu-item-group>
            <el-menu-item-group>
              <el-menu-item index="2-2" @click="router.push({ name: 'UnitList' })">企业管理-显示</el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
          <!-- 部门管理信息 -->
          <el-sub-menu index="3">
            <template #title>
              <el-icon>
                <location />
              </el-icon>
              <span>部门管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="3-1" @click="router.push('/Department')">部门管理-添加</el-menu-item>
            </el-menu-item-group>
            <el-menu-item-group>
              <el-menu-item index="3-2" @click="router.push({ name: 'DepartmentList' })">部门管理-显示</el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
          <!-- 种羊历史显示信息 -->
          <el-menu-item index="4">
            <el-icon><icon-menu /></el-icon>
            <span @click="router.push({ name: 'SheepHistorySelect' })">种羊历史</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-container>
        <el-header
          style="background-color: #545c64; text-align: center; font-size: 30px; color:aliceblue;">智慧畜牧育种管理平台</el-header>
        <el-main>
          <RouterView />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router'
const router = useRouter();
</script>
<style scoped></style>